package com.insigma.business.qrcode.common._bff.impl;

import com.alibaba.fastjson.JSONObject;
import com.insigma.business.qrcode.common._bff.UserSwitchBffProvider;
import com.insigma.business.qrcode.common.service.UserSwitchService;
import com.insigma.business.qrcode.common.vo.BaseResponse;
import com.insigma.business.qrcode.merchant.dto.CareWelfareMerchantEntryApplyDTO;
import com.insigma.business.qrcode.merchant.dto.request.CareWelfareMerchantEntryApplySearchRequest;
import com.insigma.business.qrcode.merchant.dto.request.CareWelfareMerchantInfoSearchRequest;
import com.insigma.business.qrcode.welfare.dto.CareWelfareMerchantInfoDTO;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component("userSwitchBffProvider")
public class UserSwitchBffProviderImpl implements UserSwitchBffProvider {
    @Resource
    private UserSwitchService userSwitchService;

    @Override
    public BaseResponse<List<JSONObject>> getUserType(CareWelfareMerchantInfoSearchRequest careWelfareMerchantInfoSearchRequest) {
        return userSwitchService.getUserType(careWelfareMerchantInfoSearchRequest);
    }

    @Override
    public BaseResponse<CareWelfareMerchantEntryApplyDTO> getMerchantApply(CareWelfareMerchantEntryApplySearchRequest careWelfareMerchantEntryApplySearchRequest) {
        return userSwitchService.getMerchantApply(careWelfareMerchantEntryApplySearchRequest);
    }

    @Override
    public BaseResponse<CareWelfareMerchantInfoDTO> switchMerchant(CareWelfareMerchantInfoSearchRequest careWelfareMerchantInfoSearchRequest) {
        return userSwitchService.switchMerchant(careWelfareMerchantInfoSearchRequest);
    }

    @Override
    public BaseResponse<String> switchSoldier() {
        return null;
    }
}
